<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: StaticAsserts.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">A C++ implementation of the Python Numpy library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_static_asserts_8hpp.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">StaticAsserts.hpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="_type_traits_8hpp_source.html">NumCpp/Core/Internal/TypeTraits.hpp</a>&quot;</code><br />
<code>#include &lt;type_traits&gt;</code><br />
</div>
<p><a href="_static_asserts_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a36abb32368b91aed0d3133a4cfd5ae92"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_static_asserts_8hpp.html#a36abb32368b91aed0d3133a4cfd5ae92">STATIC_ASSERT_ARITHMETIC</a>(dtype)&#160;&#160;&#160;static_assert(is_arithmetic_v&lt;dtype&gt;, &quot;Can only be used with arithmetic types&quot;)</td></tr>
<tr class="separator:a36abb32368b91aed0d3133a4cfd5ae92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1589f74d429e30786c65cda69b17ab96"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_static_asserts_8hpp.html#a1589f74d429e30786c65cda69b17ab96">STATIC_ASSERT_ARITHMETIC_OR_COMPLEX</a>(dtype)</td></tr>
<tr class="separator:a1589f74d429e30786c65cda69b17ab96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cd1b98c2b918cbd369afc12c11a0597"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_static_asserts_8hpp.html#a1cd1b98c2b918cbd369afc12c11a0597">STATIC_ASSERT_COMPLEX</a>(dtype)</td></tr>
<tr class="separator:a1cd1b98c2b918cbd369afc12c11a0597"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cd8e186da549fbdd918111d0302d973"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_static_asserts_8hpp.html#a0cd8e186da549fbdd918111d0302d973">STATIC_ASSERT_FLOAT</a>(dtype)&#160;&#160;&#160;static_assert(is_floating_point_v&lt;dtype&gt;, &quot;Can only be used with float types&quot;)</td></tr>
<tr class="separator:a0cd8e186da549fbdd918111d0302d973"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a187660686583e9047c0cf4424259ad10"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_static_asserts_8hpp.html#a187660686583e9047c0cf4424259ad10">STATIC_ASSERT_INTEGER</a>(dtype)&#160;&#160;&#160;static_assert(is_integral_v&lt;dtype&gt;, &quot;Can only be used with integer types&quot;)</td></tr>
<tr class="separator:a187660686583e9047c0cf4424259ad10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00cfe1ea01e56fe28ffe3d6ce5cae468"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_static_asserts_8hpp.html#a00cfe1ea01e56fe28ffe3d6ce5cae468">STATIC_ASSERT_VALID_DTYPE</a>(dtype)&#160;&#160;&#160;static_assert(<a class="el" href="namespacenc.html#aae4eab83016ec7dcaa7d78b6d1e78481">nc::is_valid_dtype_v</a>&lt;dtype&gt;, &quot;Template type is not a valid dtype for NdArray&quot;)</td></tr>
<tr class="separator:a00cfe1ea01e56fe28ffe3d6ce5cae468"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>David Pilger <a href="#" onclick="location.href='mai'+'lto:'+'dpi'+'lg'+'er2'+'6@'+'gma'+'il'+'.co'+'m'; return false;">dpilg<span style="display: none;">.nosp@m.</span>er26<span style="display: none;">.nosp@m.</span>@gmai<span style="display: none;">.nosp@m.</span>l.co<span style="display: none;">.nosp@m.</span>m</a> <a href="https://github.com/dpilger26/NumCpp">GitHub Repository</a> </dd></dl>
<dl class="section version"><dt>Version</dt><dd>2.1.0</dd></dl>
<h1><a class="anchor" id="License"></a>
License</h1>
<p>Copyright 2020 David Pilger</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
<h1><a class="anchor" id="Description"></a>
Description</h1>
<p>Some helper routines for checking types </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a36abb32368b91aed0d3133a4cfd5ae92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36abb32368b91aed0d3133a4cfd5ae92">&#9670;&nbsp;</a></span>STATIC_ASSERT_ARITHMETIC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATIC_ASSERT_ARITHMETIC</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dtype</td><td>)</td>
          <td>&#160;&#160;&#160;static_assert(is_arithmetic_v&lt;dtype&gt;, &quot;Can only be used with arithmetic types&quot;)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1589f74d429e30786c65cda69b17ab96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1589f74d429e30786c65cda69b17ab96">&#9670;&nbsp;</a></span>STATIC_ASSERT_ARITHMETIC_OR_COMPLEX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dtype</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">    static_assert(std::is_arithmetic&lt;dtype&gt;::value || is_complex_v&lt;dtype&gt;, \</div>
<div class="line">    <span class="stringliteral">&quot;Can only be used with arithmetic types or std::complex types&quot;</span>)</div>
</div><!-- fragment -->
</div>
</div>
<a id="a1cd1b98c2b918cbd369afc12c11a0597"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cd1b98c2b918cbd369afc12c11a0597">&#9670;&nbsp;</a></span>STATIC_ASSERT_COMPLEX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATIC_ASSERT_COMPLEX</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dtype</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">    static_assert(is_complex_v&lt;dtype&gt;, \</div>
<div class="line">    <span class="stringliteral">&quot;Can only be used with std::complex types&quot;</span>)</div>
</div><!-- fragment -->
</div>
</div>
<a id="a0cd8e186da549fbdd918111d0302d973"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0cd8e186da549fbdd918111d0302d973">&#9670;&nbsp;</a></span>STATIC_ASSERT_FLOAT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATIC_ASSERT_FLOAT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dtype</td><td>)</td>
          <td>&#160;&#160;&#160;static_assert(is_floating_point_v&lt;dtype&gt;, &quot;Can only be used with float types&quot;)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a187660686583e9047c0cf4424259ad10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a187660686583e9047c0cf4424259ad10">&#9670;&nbsp;</a></span>STATIC_ASSERT_INTEGER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATIC_ASSERT_INTEGER</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dtype</td><td>)</td>
          <td>&#160;&#160;&#160;static_assert(is_integral_v&lt;dtype&gt;, &quot;Can only be used with integer types&quot;)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a00cfe1ea01e56fe28ffe3d6ce5cae468"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00cfe1ea01e56fe28ffe3d6ce5cae468">&#9670;&nbsp;</a></span>STATIC_ASSERT_VALID_DTYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATIC_ASSERT_VALID_DTYPE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dtype</td><td>)</td>
          <td>&#160;&#160;&#160;static_assert(<a class="el" href="namespacenc.html#aae4eab83016ec7dcaa7d78b6d1e78481">nc::is_valid_dtype_v</a>&lt;dtype&gt;, &quot;Template type is not a valid dtype for NdArray&quot;)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_34171bd951b13a53aa9f237277a18e40.html">NumCpp</a></li><li class="navelem"><a class="el" href="dir_a0b3eef1c4a290b815c33ad6e7027cf3.html">Core</a></li><li class="navelem"><a class="el" href="dir_fda794c261a16a342ab8761046b335b7.html">Internal</a></li><li class="navelem"><a class="el" href="_static_asserts_8hpp.html">StaticAsserts.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
